#include <iostream>
#include <string>
using namespace std;

class Solution {
    public: 
    string str_right_row(string str,int num)
    {
        for (int i = 0; i < num;i++)
        {
            auto it = str.end() - 1;
            char temp = *it;
            while(it!=str.begin())
            {
                *it = *(it - 1);
                it--;
            }
            *it = temp;
        }
        return str;
    }
};

int main()
{
    Solution soul;
    string s = "abcdefg";
    string s1=soul.str_right_row(s,2);
    cout << s1;
    return 0;
}